<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>PowerVR SDK</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
<table width="100%">
  <tr>
    <td width="33%">
      <p align="left">&nbsp;<a href="http://www.imgtec.com"><img border="0" src="IMGLogo.jpg" width="200" height="30"></a></p>
    </td>
    <td width="33%">
      <p align="center"><font color="#808080" face="Arial" size="2">PowerVR Software Development Kit</a></font></p>
    </td>
    <td width="34%">
      <p align="right"><a href="http://www.powervr.com"><img border="0" src="PVRlogo.jpg" width="200" height="27"></a></p>
    </td>
  </tr>
</table>
<hr>
</head><body>
<!-- Generated by Doxygen 1.3.6 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>
<h1>PVRTTextureAPI.h</h1><a href="PVRTTextureAPI_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">/******************************************************************************</span>
00002 <span class="comment"></span>
00003 <span class="comment"> @File         PVRTTextureAPI.h</span>
00004 <span class="comment"></span>
00005 <span class="comment"> @Title        OGLES2/PVRTTextureAPI</span>
00006 <span class="comment"></span>
00007 <span class="comment"> @Version      </span>
00008 <span class="comment"></span>
00009 <span class="comment"> @Copyright    Copyright (C)  Imagination Technologies Limited.</span>
00010 <span class="comment"></span>
00011 <span class="comment"> @Platform     ANSI compatible</span>
00012 <span class="comment"></span>
00013 <span class="comment"> @Description  OGLES2 texture loading.</span>
00014 <span class="comment"></span>
00015 <span class="comment">******************************************************************************/</span>
00016 <span class="preprocessor">#ifndef _PVRTTEXTUREAPI_H_</span>
00017 <span class="preprocessor"></span><span class="preprocessor">#define _PVRTTEXTUREAPI_H_</span>
00018 <span class="preprocessor"></span>
00019 <span class="preprocessor">#include "../PVRTError.h"</span>
00020 
00021 <span class="comment">/****************************************************************************</span>
00022 <span class="comment">** Functions</span>
00023 <span class="comment">****************************************************************************/</span>
00024 
00025 <span class="comment">/*!***************************************************************************</span>
00026 <span class="comment"> @Function      PVRTTextureLoadFromPointer</span>
00027 <span class="comment"> @Input         pointer             Pointer to header-texture's structure</span>
00028 <span class="comment"> @Modified      texName             the OpenGL ES texture name as returned by glBindTexture</span>
00029 <span class="comment"> @Modified      psTextureHeader     Pointer to a PVR_Texture_Header struct. Modified to</span>
00030 <span class="comment">                                    contain the header data of the returned texture Ignored if NULL.</span>
00031 <span class="comment"> @Input         bAllowDecompress    Allow decompression if PVRTC is not supported in hardware.</span>
00032 <span class="comment"> @Input         nLoadFromLevel      Which mipmap level to start loading from (0=all)</span>
00033 <span class="comment"> @Input         texPtr              If null, texture follows header, else texture is here.</span>
00034 <span class="comment"> @Return        PVR_SUCCESS on success</span>
00035 <span class="comment"> @Description   Allows textures to be stored in C header files and loaded in. Can load parts of a</span>
00036 <span class="comment">                mipmaped texture (ie skipping the highest detailed levels).</span>
00037 <span class="comment">                Sets the texture MIN/MAG filter to GL_LINEAR_MIPMAP_NEAREST/GL_LINEAR</span>
00038 <span class="comment">                if mipmaps are present, GL_LINEAR/GL_LINEAR otherwise.</span>
00039 <span class="comment">*****************************************************************************/</span>
00040 <a class="code" href="PVRTError_8h.html#a5">EPVRTError</a> <a class="code" href="PVRTTextureAPI_8h.html#a0">PVRTTextureLoadFromPointer</a>(  <span class="keyword">const</span> <span class="keywordtype">void</span>* pointer,
00041                                         GLuint *<span class="keyword">const</span> texName,
00042                                         <span class="keyword">const</span> <span class="keywordtype">void</span> *psTextureHeader=NULL,
00043                                         <span class="keywordtype">bool</span> bAllowDecompress = <span class="keyword">true</span>,
00044                                         <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nLoadFromLevel=0,
00045                                         <span class="keyword">const</span> <span class="keywordtype">void</span> * <span class="keyword">const</span> texPtr=0);
00046 
00047 <span class="comment">/*!***************************************************************************</span>
00048 <span class="comment"> @Function      PVRTTextureLoadFromPVR</span>
00049 <span class="comment"> @Input         filename            Filename of the .PVR file to load the texture from</span>
00050 <span class="comment"> @Modified      texName             the OpenGL ES texture name as returned by glBindTexture</span>
00051 <span class="comment"> @Modified      psTextureHeader     Pointer to a PVR_Texture_Header struct. Modified to</span>
00052 <span class="comment">                                    contain the header data of the returned texture Ignored if NULL.</span>
00053 <span class="comment"> @Input         bAllowDecompress    Allow decompression if PVRTC is not supported in hardware.</span>
00054 <span class="comment"> @Input         nLoadFromLevel      Which mipmap level to start loading from (0=all)</span>
00055 <span class="comment"> @Return        PVR_SUCCESS on success</span>
00056 <span class="comment"> @Description   Allows textures to be stored in binary PVR files and loaded in. Can load parts of a</span>
00057 <span class="comment">                mipmaped texture (ie skipping the highest detailed levels).</span>
00058 <span class="comment">                Sets the texture MIN/MAG filter to GL_LINEAR_MIPMAP_NEAREST/GL_LINEAR</span>
00059 <span class="comment">                if mipmaps are present, GL_LINEAR/GL_LINEAR otherwise.</span>
00060 <span class="comment">*****************************************************************************/</span>
00061 <a class="code" href="PVRTError_8h.html#a5">EPVRTError</a> <a class="code" href="PVRTTextureAPI_8h.html#a1">PVRTTextureLoadFromPVR</a>(  <span class="keyword">const</span> <span class="keywordtype">char</span> * <span class="keyword">const</span> filename,
00062                                     GLuint * <span class="keyword">const</span> texName,
00063                                     <span class="keyword">const</span> <span class="keywordtype">void</span> *psTextureHeader=NULL,
00064                                     <span class="keywordtype">bool</span> bAllowDecompress = <span class="keyword">true</span>,
00065                                     <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nLoadFromLevel=0);
00066 
00067 <span class="comment">/*!***************************************************************************</span>
00068 <span class="comment"> @Function          PVRTTextureFormatGetBPP</span>
00069 <span class="comment"> @Input             nFormat</span>
00070 <span class="comment"> @Input             nType</span>
00071 <span class="comment"> @Description       Returns the bits per pixel (BPP) of the format.</span>
00072 <span class="comment">*****************************************************************************/</span>
00073 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="PVRTTextureAPI_8h.html#a2">PVRTTextureFormatGetBPP</a>(<span class="keyword">const</span> GLuint nFormat, <span class="keyword">const</span> GLuint nType);
00074 
00075 
00076 <span class="preprocessor">#endif </span><span class="comment">/* _PVRTTEXTUREAPI_H_ */</span>
00077 
00078 <span class="comment">/*****************************************************************************</span>
00079 <span class="comment"> End of file (PVRTTextureAPI.h)</span>
00080 <span class="comment">*****************************************************************************/</span>
00081 
</pre></div><br>
<br>
<P align=left><FONT size=2><STRONG><A 
   href="http://www.imgtec.com/powervr/insider/legal/index.asp">Copyright</A> � 
   1999-2008, Imagination Technologies Ltd.</STRONG></FONT></P>
<hr>
<address style="align: left;"><small><FONT color=f0f>
Generated by <a href="http://www.doxygen.org/index.html">DOXYGEN</a> 1.3.6</small></address>
</body>
</html>
